from django.urls import path
from ai_inspect import views

namespace = 'ai_inspect'

urlpatterns = [
    # 主页
    path('', views.main_index, name='main_index'),
    # 换电站
    path('station/', views.station_index, name='station_index'),
    path("station/<str:station_id>/", views.station_detail, name="station_detail"),
    path("station_create/", views.station_create, name="station_create"),
    path("station_update/<str:station_id>/", views.station_update, name="station_update"),
    path("station_photo/<str:station_id>", views.station_photo, name="station_photo"),
    path("station_channel_photo/<str:station_id>/<str:channel_name>/<str:capture_date>/",
         views.station_channel_photo, name="station_channel_photo"),
    path("station_date_photo/<str:station_id>/<str:capture_date>/",
         views.station_date_photo, name="station_date_photo"),
    path("station_battery_count_list/<str:business_unit>/", views.station_battery_count_list,
         name="station_battery_count_list"),
    path("station_battery_count_index/", views.station_battery_count_index, name="station_battery_count_index"),
    path("station_battery_count_validate/<str:station_id>/", views.station_battery_count_validate,
         name="station_battery_count_validate"),
    # 智能巡检算法
    path("algorithm/", views.algorithm_index, name='algorithm_index'),
    path("algorithm_create/", views.algorithm_create, name='algorithm_create'),
    path("algorithm_metric/<str:algorithm_name>/", views.algorithm_metric, name="algorithm_metric"),
    # 换电服务记录
    path("swap_records/<str:station_id>/", views.swap_record_list, name="swap_records"),
    # 抓拍图片
    path("swap_photo/<str:order_sn>/", views.swap_record_photo, name="swap_record"),
    # 视频推理机
    path("aibox/", views.aibox_index, name="aibox_index"),
    path("aibox_create/<str:station_id>/", views.aibox_create, name="aibox_create"),
    path("aibox_update/<str:station_id>/", views.aibox_update, name="aibox_update"),
    # 视频监控通道
    path("channel_create/<str:station_id>/", views.channel_create, name="channel_create"),
    path("channel_update/<str:station_id>/<str:channel_id>/", views.channel_update, name="channel_update"),
    path("channel_delete/<str:station_id>/<str:channel_id>/", views.channel_delete, name="channel_delete"),
    # 巡检请求
    path("inspect_request/", views.inspect_request_index, name="inspect_request_index"),
    path("algorithm_request/<str:algorithm_topic>/", views.algorithm_request, name="algorithm_request"),
    path("inspect_request/<str:request_name>/", views.inspect_request_detail, name="inspect_request_detail"),
    path("inspect_request_verify/<str:request_name>/<str:verification>/", views.inspect_request_verify,
         name="inspect_request_verify"),
    path("algorithm_station_request/<str:algorithm_topic>/<str:station_id>/", views.station_algorithm_request,
         name="station_algorithm_request"),
    path("inspect_request_query/<str:algorithm_topic>/<str:query>/", views.inspect_request_query,
         name="inspect_result_query"),
    # 巡检结果
    path("inspect_result/", views.inspect_result_index, name="inspect_result_index"),
    path("algorithm_result/<str:algorithm_topic>/", views.algorithm_result, name="algorithm_result"),
    path("inspect_result/<int:result_id>/", views.inspect_result_detail, name="result_detail"),
    path("inspect_result_verify/<int:result_id>/<str:verification>/", views.inspect_result_verify,
         name="result_verify"),
    # 巡检规则
    path("step_rule_create/<str:station_id>/", views.step_rule_create, name="step_rule_create"),
    path("step_rule_update/<str:station_id>/<str:rule_id>/", views.step_rule_update, name="step_rule_update"),
    path("step_rule_delete/<str:station_id>/<str:rule_id>/", views.step_rule_delete, name="step_rule_delete"),
    path("period_rule_create/<str:station_id>/", views.period_rule_create, name="period_rule_create"),
    path("period_rule_update/<str:station_id>/<str:rule_id>/", views.period_rule_update, name="period_rule_update"),
    path("period_rule_delete/<str:station_id>/<str:rule_id>/", views.period_rule_delete, name="period_rule_delete"),
]